package com.kratos.designdemo.controller;

import com.kratos.designdemo.controller.vo.OrderVo;
import com.kratos.designdemo.service.impl.OrderStatusServiceAdapter;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author kratos
 * @date 2022-06-09 13:38:31
 */
@RestController
@RequestMapping("/order")
public class OrderController {

    @Autowired
    private OrderStatusServiceAdapter adapter;

    @RequestMapping("/test")
    public String test() {

        return "This is request demo!!!";
    }

    @RequestMapping("/updateOrderStatus")
    public String updateOrderStatus(@RequestBody OrderVo orderVo) {
        adapter.updateOrderStatus(orderVo);

        return "status order update is ok!!!! ";
    }
}
